package com.example.wxback.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.wxback.util.constants.Constants;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("sys_user")
@EqualsAndHashCode(callSuper = false)
public class UserInfo implements Serializable {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private Integer id;

    @TableId(value = "child_id")
    private Integer childId;
    private String nickname;
    private String password;
    private String phone;

    @TableId(value = "member_type")
    private Integer memberType;

    @TableId(value = "activate_code")
    private String activateCode;//激活码

    @TableId(value = "create_time")
    @JsonFormat(pattern = Constants.DATETIME_FORMAT, timezone = "GMT+8")
    private Date createTime;//到期时间

    @TableId(value = "update_time")
    @JsonFormat(pattern = Constants.DATETIME_FORMAT, timezone = "GMT+8")
    private Date updateTime;

    @TableId(value = "expiration_time")
    @JsonFormat(pattern = Constants.DATETIME_FORMAT, timezone = "GMT+8")
    private Date expirationTime;

    private Integer enable;

    @TableId(value = "delete_status")
    private Integer deleteStatus;

    @TableId(value = "device_token")
    private String deviceToken;

    @TableField(exist = false)
    private String childPhone;

    @TableField(exist = false)
    private Integer childEnable;
}
